<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<title>青橙，欢迎登录</title>
	<link rel="icon" href="./img/favicon.ico">
	<script src="/js/jquery-3.4.1.js"></script>
    <link rel="stylesheet" type="text/css" href="/css/all.css" />
    <link rel="stylesheet" type="text/css" href="/css/pages-login.css" />
</head>

<body>
	<!-- 头部栏位 -->
	<!--页面顶部-->
<div id="nav-bottom" th:insert="index-nav::index-nav">
	<!--顶部-->

</div>

	<div class="login-box">

		<!--loginArea-->
		<div class="loginArea">
			<div class="py-container login">
				<div class="loginform">
					<ul class="sui-nav nav-tabs tab-wraped">
						<li id="tabSuiForm" class="active" onclick="switchSuiForm()">
							<a href="javascript:void(0)" data-toggle="tab" >
								<h3>账户登录</h3>
							</a>
						</li>
					</ul>
					<div class="tab-content tab-wraped">
						<div id="profile" class="tab-pane active">
							<form class="sui-form" action="/login" method="post" name="frm">
								<input id="eon" type="hidden" />
								<div class="input-prepend"><span class="add-on loginname"></span>
									<input id="inputName" name="emailOrLoginName" type="text" placeholder="邮箱/用户名" class="span2 input-xfat">
								</div>
								<div class="input-prepend"><span class="add-on loginpwd"></span>
									<input id="inputPassword" name="password" type="password" placeholder="请输入密码" class="span2 input-xfat">
								</div>
								<div class="logined">
									<input type="button" onclick="doSubmit()" class="sui-btn btn-block btn-xlarge btn-danger" value="登&nbsp;&nbsp;录"></input>
								</div>
							</form>
							<div class="otherlogin">
								<div class="types">
									<ul>
										<li><img src="/img/qq.png" width="35px" height="35px" /></li>
										<li><img src="/img/sina.png" /></li>
										<li><img src="/img/ali.png" /></li>
										<li><img src="/img/weixin.png" /></li>
									</ul>
								</div>
								<span class="register"><a href="/register">立即注册</a></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--foot-->
		<div class="py-container copyright">
			<ul>
				<li>关于我们</li>
				<li>联系我们</li>
				<li>联系客服</li>
				<li>商家入驻</li>
				<li>营销中心</li>
				<li>手机品优购</li>
				<li>销售联盟</li>
				<li>品优购社区</li>
			</ul>
			<div class="address">地址：黑龙江省黑河市爱辉区学院路黑河学院</div>
			<div class="beian">&copy;www.hhhxy.cn
			</div>
		</div>
	</div>

<script type="text/javascript">
	function doSubmit() {
		var login = frm.emailOrLoginName.value
		if (login.length == 0 || login == "") {
			alert("请输入用户名或邮箱地址")
			return
		}
		$("#eon").attr("value", login)
		var reg = /[@]+/
		if (reg.test(login)) {
			$("#eon").attr("name", "email")
		} else {
			$("#eon").attr("name", "loginname")
		}
		var pwd = frm.password.value
		if (pwd.length == 0 || pwd == "") {
			alert("请输入密码")
			return
		}
		frm.submit()
	}

	function switchSuiForm() {
		document.getElementById('index').className = "tab-pane";
		document.getElementById('profile').className = "tab-pane active";
		document.getElementById('tabSuiForm').className = "active";
		document.getElementById('tabOtherLogin').className = "";
	}
	function switchOtherLogin() {
		document.getElementById('index').className = "tab-pane active";
		document.getElementById('profile').className = "tab-pane";
		document.getElementById('tabSuiForm').className = "";
		document.getElementById('tabOtherLogin').className = "active";
	}
</script>
</body>
</html>